# Documentation to reproduce the analysis presented in "Affording Fragmented Audiences: Multi-Platform Deliberation within the Five Star Movement"



To replicate the analysis presented in the paper, download all code and data files from the repository and run the scripts in the order presented below. Access to data files containing identifiable information is restricted but can be requested.


## Research Design

```console
Rscript code/R/figure_1.R
```

## Results

### Cross-platform Affordances

```console
Rscript code/R/figure_2.R
```

### Cross-platform integration

```console
Rscript code/R/figure_3_a.R
```

```console
Rscript code/R/figure_3_b.R
```

### Analysis of Communicative Power

```console
jupyter notebook code/python/n-gram frequency.ipynb # Optional
```

Note: This step is optional as results from `n-gram frequency.ipynb` are stored in `figure_4.R` in plain text.

```console
Rscript code/R/figure_4.R
```

### Multi-platform effects on Online Primaries 


```console
Rscript code/R/table_3.R # Optional
```

Note: This step is optional as output from `table_3.R` is stored in `data/processed/pwdprotect_effect_on_primary.RData`.

```console
Rscript code/R/figure_5.R
```

```console
Rscript code/R/figure_6.R
```

### Online appendix

```console
Rscript -e "code/RMarkdown/online-appendix.Rmd"
```
